// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)

import Login from './components/login'
Vue.component('m-login', Login)

import Header from './components/header'
Vue.component('m-header', Header)

import Aside from './components/aside'
Vue.component('m-aside', Aside)

import View from './components/view/index'
Vue.component('m-view', View) //前端首页
import Vheader from './components/view/header'
Vue.component('v-header', Vheader) //前端统一头部
import Vfooter from './components/view/footer'
Vue.component('v-footer', Vfooter) //前端统一底部
import Vcontact from './components/view/contact'
Vue.component('v-contact', Vcontact) //前端统一联系

Vue.use(ElementUI)
Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  // template: '<App/>'
  render: h => h(App),
})


